package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectForProjectTemplateRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-21
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectForProjectTemplateRequestConvert extends BaseConvert {
    public static ProjectForProjectTemplate convert(ProjectForProjectTemplateRequest request) throws Exception {
        ProjectForProjectTemplate daoRequest = new ProjectForProjectTemplate();
        copyProperties(request, daoRequest);

        daoRequest.setName(daoRequest.getName() == null ? null : daoRequest.getName().trim());
        daoRequest.setCreateTime(daoRequest.getCreateTime() == null ? null : daoRequest.getCreateTime().trim());
        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setOrganizationCode(daoRequest.getOrganizationCode() == null ? null : daoRequest.getOrganizationCode().trim());
        daoRequest.setCover(daoRequest.getCover() == null ? null : daoRequest.getCover().trim());
        daoRequest.setMemberCode(daoRequest.getMemberCode() == null ? null : daoRequest.getMemberCode().trim());
        daoRequest.setDescription(daoRequest.getDescription() == null ? null : daoRequest.getDescription().trim());
        daoRequest.setTaskStagesInfo(daoRequest.getTaskStagesInfo() == null ? null : daoRequest.getTaskStagesInfo().trim());

        return daoRequest;
    }
}
